package com.base.view;

import java.util.List;

public class ListResult<T> extends BaseResult {
	private Integer total;
	private List<T> list;
	private Integer other;

	public List<T> getList() {
		return list;
	}

	public ListResult<T> setList(List<T> list) {
		this.list = list;
		return this;
	}

	public int getTotal() {
		if (total == null)
			return list.size();
		return total;
	}

	public ListResult<T> setTotal(int total) {
		this.total = total;
		return this;
	}

	public double getOther() {
		if (other == null)
			return list.size();
		return other;
	}

	public ListResult<T> setOther(Integer other) {
		this.other = other;
		return this;
	}
}